<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../scripts/jquery-1.11.3.min.js"></script>
    <script src="../../scripts/lib/echarts-2.2.7/esl.js"></script>
    <script src="../../scripts/lib/echarts-2.2.7/echarts.js"></script>
<style>html,body,.chart{height:100%;margin:0;padding:0;}</style>
</head>
<body>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="chart1" class="chart"></div>
    <!-- ECharts单文件引入 -->


    <script type="text/javascript">
        $(function() {

    // 路径配置
    require.config({
        paths: {
            echarts: '../../scripts/lib/echarts-2.2.7'
        }
    });

    require(
        [
        'echarts',
        'echarts/chart/chord'
            // 'echarts/chart/line' // 使用柱状图就加载bar模块，按需加载
            ],
            function(ec) {
            // 基于准备好的dom，初始化echarts图表
            var myChart = ec.init(document.getElementById('chart1'));
// **begin

option = {
    color : [
        '#FBB367','#80B1D2','#FB8070','#CC99FF','#B0D961',
        '#99CCCC','#BEBBD8','#FFCC99','#8DD3C8','#FF9999',
        '#CCEAC4','#BB81BC','#FBCCEC','#CCFF66','#99CC66',
        '#66CC66','#FF6666','#FFED6F','#ff7f50','#87cefa',
    ],

    tooltip : {
        trigger: 'item',
        formatter : function (params) {
            if (params.name && params.name.indexOf('-') != -1) {
                return params.name.replace('-', ' ' + params.seriesName + ' ')
            }
            else {
                return params.name ? params.name : params.data.id
            }
        }
    },
    series : [
        {
            "name": "主叫",
            "type": "chord",
            "showScaleText": false,
            "clockWise": false,
            "data": [
                {"name": "15123457890"},
                {"name": "13609821345"},
                {"name": "18012340987"},
                {"name": "13456781234"},
                {"name": "18905432134"},
                {"name": "13109874567"},
                {"name": "18701256783"},
                {"name": "17704326871"},
                {"name": "17703267911"},
                {"name": "13109873214"},
            ],
            "matrix": [
               [0,100,0,0,0,0,100,0,0,0],
                [10,0,0,0,0,10,10,0,10,0],
                [0,0,0,10,0,0,0,0,0,10],
                [0,0,100,0,0,100,0,0,0,0],
                [0,0,0,0,0,0,0,0,0,0],
                [0,100,0,10,0,0,0,0,0,0],
                [10,100,0,0,0,0,0,0,0,0],
                [0,0,0,0,0,0,0,0,0,0],
                [0,100,0,0,0,0,0,0,0,0],
                [0,0,100,0,0,0,0,0,0,0],
            ]
        },
        {
            "name": "被叫",
            "type": "chord",
            "insertToSerie": "主叫",
            "data": [
                {"name": "15123457890"},
                {"name": "13609821345"},
                {"name": "18012340987"},
                {"name": "13456781234"},
                {"name": "18905432134"},
                {"name": "13109874567"},
                {"name": "18701256783"},
                {"name": "17704326871"},
                {"name": "17703267911"},
                {"name": "13109873214"},
            ],
            "matrix": [
                [0,100,0,0,0,0,100,0,0,0],
                [10,0,0,0,0,10,10,0,10,0],
                [0,0,0,10,0,0,0,0,0,10],
                [0,0,100,0,0,100,0,0,0,0],
                [0,0,0,0,0,0,0,0,0,0],
                [0,100,0,10,0,0,0,0,0,0],
                [10,100,0,0,0,0,0,0,0,0],
                [0,0,0,0,0,0,0,0,0,0],
                [0,100,0,0,0,0,0,0,0,0],
                [0,0,100,0,0,0,0,0,0,0],
            ]
        },

    ]
};

//end
            // 为echarts对象加载数据
            myChart.setOption(option);
            window.onresize = myChart.resize
        }
        );

})
</script>
</body>
</html>

